package protocol;

public class GameToConnect extends User {

	public int port;
	private String gameStyle;
	public long lastAnnouncement;

	public GameToConnect(String ip, int port, String name, String gameStyle) {
		super(ip, name);
		this.port = port;
		this.gameStyle = gameStyle;
		this.lastAnnouncement = System.currentTimeMillis();
	}

	public long lastConnection(long now) {
		return now - lastAnnouncement;
	}

	@Override
	public String toString() {
		return name+" ("+ip+":"+port+")";
	}

}
